<html>
    <head>
        <title>Using Carmesi in a project</title>
        <link rel="stylesheet" href="nbdocs:/org/netbeans/modules/usersguide/ide.css" type="text/css">
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
        <h2>Using Carmesi in a project</h2>
        <p>
            To create a new project with Carmesi, follow these steps:
        </p>
        <ol>
            <li>
                In the Project window, right-click an empty area and select New Project
            </li>
            <li>
                Select Java Web category and choose Web Application type. Click Next.
            </li>
            <li>
                Introduce a name and location for your project. Click Next.
            </li>
            <li>
                Select server and aditional settings. Click Next.
            </li>
            <li>
                Check the Carmesi box.
            </li>
            <li>
                If you want to configure Carmesi parameters, make sure that Carmesi is selected and modify any of the values (the parameters are added to the web.xml when they don't have its default value).
            </li>
            <li>
                Click Finish.
            </li>
        </ol>
        <p>
            Carmesi allows the following configuration:
        </p>
        <ul>
            <li>
                <p>
                    Max age of cookies for controller methods annotated with @CookieValue. 
                    A negative value means that the cookie is not stored persistently and will be deleted when the Web browser exits.
                    A value of 0 means that the cookie will be deleted. Any positive values indicates max age in minutes.
                </p>
                <p>For more information about adding cookies in Carmesi, see:</p>
                <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
                    <param name="content" value="http://code.google.com/p/carmesi/wiki/CarmesiGuide#Adding_cookies_to_the_response">
                    <param name="text" value="<html><u>Adding cookies to the response</u></html>">
                    <param name="textFontSize" value="medium">
                    <param name="textColor" value="blue">
                </object>
                
                <p>For more information about Cookie expiration, see javadocs:</p>
                <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
                    <param name="content" value="http://download.oracle.com/javaee/6/api/javax/servlet/http/Cookie.html#setMaxAge(int)">
                    <param name="text" value="<html><u>http://download.oracle.com/javaee/6/api/javax/servlet/http/Cookie.html#setMaxAge(int)</u></html>">
                    <param name="textFontSize" value="medium">
                    <param name="textColor" value="blue">
                </object>
            </li>
            <li>
                <p>
                    The full classname of the implementation for serializing an object to its JSON representation. This class is only meaningful 
                    if you are using controllers that returns a JSON response.
                </p>
                
                <p>For more information, see:</p>
                <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
                    <param name="content" value="http://code.google.com/p/carmesi/wiki/CarmesiGuide#JSON_Serialization">
                    <param name="text" value="<html><u>JSON Serialization</u></html>">
                    <param name="textFontSize" value="medium">
                    <param name="textColor" value="blue">
                </object>
            </li>
            <li>
                <p>
                    Specify if request attributes are automatic set with the return value of a controller.
                </p>
                
                <p>For more information, see:</p>
                <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
                    <param name="content" value="http://code.google.com/p/carmesi/wiki/CarmesiGuide#Setting_an_attribute">
                    <param name="text" value="<html><u>Setting attributes</u></html>">
                    <param name="textFontSize" value="medium">
                    <param name="textColor" value="blue">
                </object>
            </li>
        </ul>
        <p>For more information about Carmes&iacute;,  check: </p>
        <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
            <param name="content" value="http://code.google.com/p/carmesi">
            <param name="text" value="<html><u>Carmesi project</u></html>">
            <param name="textFontSize" value="medium">
            <param name="textColor" value="blue">
        </object>
    </body>
</html>
